<%@ Page Language="C#" MasterPageFile="~/master/public-regular.master" AutoEventWireup="true"
    CodeFile="order-summary.aspx.cs" Inherits="order_summary" %>

<%@ Register  Namespace="ECommerce.Library.Web" TagPrefix="ucc" %>
<%@ Register  Namespace="ECommerce.Library.ECommerce" TagPrefix="ucc" %>
<%@ Register Src="~/controls/wucValidator.ascx" TagName="Validator" TagPrefix="wuc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderNestedHeader"
    runat="Server">

   
    <link href="<%= SiteGlobals.BaseUrl %>javascript/datetime/jquery-ui-1.8.8.custom.css"
        rel="stylesheet" type="text/css" />

    <script src="<%= SiteGlobals.BaseUrl %>javascript/jquery.ui.core.js" type="text/javascript"></script>
    <script src="<%= SiteGlobals.BaseUrl %>javascript/datetime/jquery.ui.datepicker.js"
        type="text/javascript"></script>
    <script type="text/javascript" src="<%= SiteGlobals.BaseUrl %>javascript/maskedinput/jquery.maskedinput-1.3.js"></script>
    
    <script type="text/javascript">
        $(document).ready(function () {

            $("#<%= tbxBillingPhone.ClientID %>").mask("999-999-9999");
            $("#<%= tbxBillingPhone2.ClientID %>").mask("999-999-9999");
            $("#<%= tbxShippingPhone.ClientID %>").mask("999-999-9999");

            var date = new Date();
            var currentMonth = date.getMonth();
            var currentDate = date.getDate();
            var currentYear = date.getFullYear();
            var validShipTime = "<%=IsValidShippingTime %>";
            
            var monarr = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            // check for leap year
            if (((currentYear % 4 == 0) && (currentYear % 100 != 0)) || (currentYear % 400 == 0)) monarr[1] = "29";
            // display day left
            var daysLeft = (monarr[currentMonth] - currentDate);

            $("#<%= tbxRequestDeliveryDate.ClientID %>").datepicker({
                changeMonth: true,
                changeYear: true,
                minDate: new Date(currentYear, currentMonth, currentDate),
                maxDate: "+" + daysLeft + "D",
                beforeShowDay: function (date) {
                    if (validShipTime == "False") {
                        if (date.getDay() == 0 || date.getDay() == 6 || date.getDay() == 5 || date.getDate() == currentDate) {
                            return [false, ''];
                        } else {
                            return [true, ''];
                        }
                    }
                    else {
                        if (date.getDay() == 0 || date.getDay() == 6 || date.getDay() == 5) {
                            return [false, ''];
                        } else {
                            return [true, ''];
                        }
                    }
                }
            });

            $("a.fancybox").fancybox({
                'overlayOpacity': 0.8,
                'overlayColor': 'black',
                'overlayShow': true
            })

        });
        function clearTextHere(field, initialText) {
            if (field != null) {
                if (field.value == initialText) {
                    field.value = "";
                }
            }
        }
        function CreditCard(str) {
            var first = str.substr(0, 1);
            $("#cardType img").css("opacity", "0.5");
            if (first == "3")
                $("#express").css("opacity", "1");
            else if (first == "4")
                $("#visa").css("opacity", "1");
            else if (first == "5")
                $("#master").css("opacity", "1");
            else if (first == "6")
                $("#discover").css("opacity", "1");
            else {
                // jAlert("Invalid Card No.");
                $("#cardType img").css("opacity", "0.5");
            }
        }
        function InvalidCard(str) {
            var first = str.substr(0, 1);
            $("#cardType img").css("opacity", "0.5");
            if (first == "3")
                $("#express").css("opacity", "1");
            else if (first == "4")
                $("#visa").css("opacity", "1");
            else if (first == "5")
                $("#master").css("opacity", "1");
            else if (first == "6")
                $("#discover").css("opacity", "1");
            else {
                jAlert("Invalid Card No.");
                $("#<%= tbxCardNumber.ClientID %>").val('');
                $("#cardType img").css("opacity", "0.5");
            }
        }
        function ShowPoBoxErr() {
            jAlert('<b>We do not ship to PO BOX.<b>', 'Error');
        }
        function CopyBillingInfo() {
            if ($("#cbxCopyBillingInfo").attr('checked')) {
                $("#<%= tbxShippingFirstName.ClientID %>").val($("#<%= tbxBillingFirstName.ClientID %>").val());
                $("#<%= tbxShippingLastName.ClientID %>").val($("#<%= tbxBillingLastName.ClientID %>").val());
                $("#<%= tbxShippingPhone.ClientID %>").val($("#<%= tbxBillingPhone.ClientID %>").val());
                $("#<%= tbxShippingEmailAddress.ClientID %>").val($("#<%= tbxBillingEmailAddress.ClientID %>").val());
                $("#<%= tbxShippingAddressLine1.ClientID %>").val($("#<%= tbxBillingAddressLine1.ClientID %>").val());
                $("#<%= tbxShippingAddressLine2.ClientID %>").val($("#<%= tbxBillingAddressLine2.ClientID %>").val());
                $("#<%= tbxShippingCity.ClientID %>").val($("#<%= tbxBillingCity.ClientID %>").val());
                $("#<%= tbxShippingZipCode.ClientID %>").val($("#<%= tbxBillingZipCode.ClientID %>").val());
                $("#<%=uccShippingState.ClientID%>").val($("#<%=uccBillingState.ClientID%>").val());
                $("#<%=uccShippingCountry.ClientID%>").val($("#<%=uccBillingCountry.ClientID%>").val());
            }
            else {
                $("#<%= tbxShippingFirstName.ClientID %>").val('');
                $("#<%= tbxShippingLastName.ClientID %>").val('');
                $("#<%= tbxShippingPhone.ClientID %>").val('');
                $("#<%= tbxShippingEmailAddress.ClientID %>").val('');
                $("#<%= tbxShippingAddressLine1.ClientID %>").val('');
                $("#<%= tbxShippingAddressLine2.ClientID %>").val('');
                $("#<%= tbxShippingCity.ClientID %>").val('');
                $("#<%= tbxShippingZipCode.ClientID %>").val('');
                $("#<%=uccShippingState.ClientID%>").val('');
                $("#<%=uccShippingCountry.ClientID%>").val('');
            }
        }
    </script>
   <%-- <style type="text/css">
        .product-list-paging, .section-heading-1
        {
            display:none;
           }
    </style>--%>
</asp:Content>
<asp:Content ID="cntContent" ContentPlaceHolderID="cphMiddleContent" runat="Server">
    <div class="regular-pages inline registration-form">
        <ucc:ResponseMessage ID="uccResponseMessage" runat="server"></ucc:ResponseMessage>
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" EnableClientScript="true"
            DisplayMode="BulletList" ShowMessageBox="false" HeaderText="Please correct the following:"
            CssClass="adminValidator" ShowSummary="False" />
        <br />
        <div class="shoping-steps">
            <div class="btn-regular btn-dim">
                Shopping Cart
            </div>
            <div class="btn-regular btn-dim">
                Login/Register
            </div>
            <div class="btn-regular">
                Order Summery
            </div>
            <div class="btn-regular btn-dim">
                Receipt
            </div>
        </div>
        <br class="clear" />
        <asp:Panel ID="pnlorderSummary" DefaultButton="imbPlaceOrderOnline" runat="server">
            <fieldset>
                <legend>Billing Address</legend><br />
                <label>
                    First Name</label>
                <asp:TextBox ID="tbxBillingFirstName" runat="server" CssClass="text"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvBillingFirstName" runat="server" ControlToValidate="tbxBillingFirstName"
                    ErrorMessage="* Required" Display="dynamic" SetFocusOnError="true" EnableClientScript="true">
                </asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator runat="server" ID="revBillingFirstName" ControlToValidate="tbxBillingFirstName"
                    EnableClientScript="true" ErrorMessage="Incorrect Name Format" SetFocusOnError="true"
                    ValidationExpression="^([a-zA-Z])+?(([- .])*?([a-zA-Z])*)*$">
                </asp:RegularExpressionValidator>
                <br />
                <label>
                    Last Name</label>
                <asp:TextBox ID="tbxBillingLastName" runat="server" CssClass="text"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvBillingLastName" runat="server" ControlToValidate="tbxBillingLastName"
                    ErrorMessage="* Required" Display="dynamic" SetFocusOnError="true" EnableClientScript="true">
                </asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator runat="server" ID="revBillingLastName" ControlToValidate="tbxBillingLastName"
                    EnableClientScript="true" ErrorMessage="Incorrect Name Format" SetFocusOnError="true"
                    ValidationExpression="^([a-zA-Z])+?(([- .])*?([a-zA-Z])*)*$">
                </asp:RegularExpressionValidator>
                <br />
                <label>
                    Best Contact Number
                </label>
                <asp:TextBox ID="tbxBillingPhone" runat="server" CssClass="text" Text=""></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvBillingPhoneNumber" runat="server" ControlToValidate="tbxBillingPhone"
                    ErrorMessage="* Required" Display="dynamic" SetFocusOnError="true" EnableClientScript="true">
                </asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator runat="server" ID="revBillingPhoneNumber" ControlToValidate="tbxBillingPhone"
                    EnableClientScript="true" ErrorMessage="Incorrect Phone" SetFocusOnError="true"
                    ValidationExpression="^\d{3}-\d{3}-\d{4}$"> 
                </asp:RegularExpressionValidator>
                <br />
                <label>
                    Secondary Contact Number
                </label>
                <asp:TextBox ID="tbxBillingPhone2" runat="server" CssClass="text" Text=""></asp:TextBox>
                <%-- <asp:RegularExpressionValidator runat="server" ID="RegularExpressionValidator1" ControlToValidate="tbxBillingPhone2"
                    EnableClientScript="true" ErrorMessage="Incorrect Phone" SetFocusOnError="true"
                    ValidationExpression="^\d{3}-\d{3}-\d{4}$" InitialValue="xxx-xxx-xxxx">
                </asp:RegularExpressionValidator>--%>
                <br />
                <label>
                    Email Address
                </label>
                <asp:TextBox ID="tbxBillingEmailAddress" runat="server" CssClass="text"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvBillingEmailAddress" runat="server" ControlToValidate="tbxBillingEmailAddress"
                    ErrorMessage="* Required" Display="dynamic" SetFocusOnError="true" EnableClientScript="true">
                </asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator runat="server" ID="revBillingEmailAddress" ControlToValidate="tbxBillingEmailAddress"
                    EnableClientScript="true" ErrorMessage="Incorrect Email Format" SetFocusOnError="true"
                    ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">
                </asp:RegularExpressionValidator>
                <br />
                <label>
                    Address Line 1</label>
                <asp:TextBox ID="tbxBillingAddressLine1" runat="server" CssClass="text"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvBillingAddressLine1" runat="server" ControlToValidate="tbxBillingAddressLine1"
                    ErrorMessage="* Required" Display="dynamic" SetFocusOnError="true" EnableClientScript="true">
                </asp:RequiredFieldValidator>
                <br />
                <label>
                    Address Line 2</label>
                <asp:TextBox ID="tbxBillingAddressLine2" runat="server" CssClass="text"></asp:TextBox>
                <br />
                <label>
                    City</label>
                <asp:TextBox ID="tbxBillingCity" runat="server" CssClass="text" 
                    ontextchanged="tbxBillingCity_TextChanged" ></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvBillingCity" runat="server" ControlToValidate="tbxBillingCity"
                    ErrorMessage="* Required" Display="dynamic" SetFocusOnError="true" EnableClientScript="true">
                </asp:RequiredFieldValidator>
                <br />
                <label>
                    State</label>
                <ucc:StateDropDownList ID="uccBillingState" runat="server" UseFirstItem="true" CssClass="input1"
                    Style="width: 155px; background-color: rgb(255, 255, 160);" FirstItemText="None / Other"
                    FirstItemValue="NA" AutoPostBack="True" OnSelectedIndexChanged="uccBillingState_SelectedIndexChanged">
                </ucc:StateDropDownList>
                <asp:RequiredFieldValidator ID="rfvBillingState" runat="server" ControlToValidate="uccBillingState"
                    ErrorMessage="* Required" Display="dynamic" SetFocusOnError="true" EnableClientScript="true">
                </asp:RequiredFieldValidator>
                <br />
                <label>
                    Zip Code</label>
                <asp:TextBox ID="tbxBillingZipCode" runat="server" CssClass="text" Width="52px" MaxLength="5"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvBillingZipCode" runat="server" ControlToValidate="tbxBillingZipCode"
                    ErrorMessage="* Required" Display="dynamic" SetFocusOnError="true">
                </asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator runat="server" ID="revBillingZipCode" ControlToValidate="tbxBillingZipCode"
                    EnableClientScript="true" ErrorMessage="Incorrect Zip" SetFocusOnError="true"
                    ValidationExpression="^\d{5}$">
                </asp:RegularExpressionValidator>
                <br />
                <label>
                    Country</label>
                <ucc:CountryDropDownList ID="uccBillingCountry" CssClass="input1" runat="server"
                    Style="width: 155px; background-color: rgb(255, 255, 160);">
                </ucc:CountryDropDownList>
                <asp:RequiredFieldValidator ID="rfvBillingCountry" runat="server" ControlToValidate="uccBillingCountry"
                    ErrorMessage="* Required" Display="dynamic" SetFocusOnError="true">
                </asp:RequiredFieldValidator><br />
            </fieldset>
            <fieldset>
                <legend>Shipping Address </legend>
                <input type="checkbox" id="cbxCopyBillingInfo" onclick="javascript:CopyBillingInfo()" />Shipping
                same as Billing
                <br />
                <br />
                <label>
                    Address Book
                </label>
                <asp:DropDownList ID="ddlShipp" runat="server" Width="250px" OnSelectedIndexChanged="ddlShipp_SelectedIndexChanged"
                    AutoPostBack="true">
                    <asp:ListItem Text="Select" Value="NA"></asp:ListItem>
                </asp:DropDownList>
                <br />
                <label>
                    Estimated Shipping Date:
                </label>
                <asp:TextBox ID="tbxRequestDeliveryDate" runat="server" CssClass="text"></asp:TextBox>
                <%-- <asp:RequiredFieldValidator ID="rfvRequestDeliveryDate" runat="server" ControlToValidate="tbxRequestDeliveryDate"
                    ErrorMessage="Request Delivery Date required" Display="dynamic" SetFocusOnError="true"
                    EnableClientScript="true">
                </asp:RequiredFieldValidator>--%>
                <asp:RegularExpressionValidator runat="server" ID="revRequestDeliveryDate" ControlToValidate="tbxRequestDeliveryDate"
                    EnableClientScript="true" ValidationGroup="vGroup" ErrorMessage="Incorrect Date Format"
                    Display="Dynamic" SetFocusOnError="true" ValidationExpression="^(0[1-9]|1[0-2])/(0[1-9]|[1-2][0-9]|3[01])/([1-9][0-9][0-9][0-9])$">
                </asp:RegularExpressionValidator>
                <p style="font-weight: bold">
                    Any orders After 11 AM CT would be process the next business day.</p>
                <asp:UpdatePanel ID="uplShippingFields" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <label>
                            First Name
                        </label>
                        <asp:TextBox ID="tbxShippingFirstName" runat="server" CssClass="text"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvShippingFirstName" runat="server" ControlToValidate="tbxShippingFirstName"
                            ErrorMessage="* Required" Display="dynamic" SetFocusOnError="true" EnableClientScript="true">
                        </asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator runat="server" ID="revShippingFirstName" ControlToValidate="tbxShippingFirstName"
                            EnableClientScript="true" ErrorMessage="Incorrect Name Format" SetFocusOnError="true"
                            ValidationExpression="^([a-zA-Z])+?(([- .])*?([a-zA-Z])*)*$">
                        </asp:RegularExpressionValidator>
                        <br />
                        <label>
                            Last Name</label>
                        <asp:TextBox ID="tbxShippingLastName" runat="server" CssClass="text"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvShippingLastName" runat="server" ControlToValidate="tbxShippingLastName"
                            ErrorMessage="* Required" Display="dynamic" SetFocusOnError="true" EnableClientScript="true">
                        </asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator runat="server" ID="revShippingLastName" ControlToValidate="tbxShippingLastName"
                            EnableClientScript="true" ErrorMessage="Incorrect Name Format" SetFocusOnError="true"
                            ValidationExpression="^([a-zA-Z])+?(([- .])*?([a-zA-Z])*)*$">
                        </asp:RegularExpressionValidator>
                        <br />
                        <label>
                            Phone</label>
                        <asp:TextBox ID="tbxShippingPhone" runat="server" CssClass="text" Text="xxx-xxx-xxxx"
                            onclick="clearTextHere(this, 'xxx-xxx-xxxx')" onblur="resetText(this, 'xxx-xxx-xxxx')"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvShippingPhoneNumber" runat="server" ControlToValidate="tbxShippingPhone"
                            ErrorMessage="* Required" Display="dynamic" SetFocusOnError="true" InitialValue="xxx-xxx-xxxx"
                            EnableClientScript="true">
                        </asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator runat="server" ID="revShippingPhoneNumber" ControlToValidate="tbxShippingPhone"
                            EnableClientScript="true" ErrorMessage="Incorrect Phone" SetFocusOnError="true"
                            ValidationExpression="^\d{3}-\d{3}-\d{4}$">
                        </asp:RegularExpressionValidator>
                        <br />
                        <label>
                            Email Address for UPS tracking notification
                        </label>
                        <br />
                        <asp:TextBox ID="tbxShippingEmailAddress" runat="server" CssClass="text"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvShippingEmailAddress" runat="server" ControlToValidate="tbxShippingEmailAddress"
                            ErrorMessage="*Required" Display="dynamic" SetFocusOnError="true" EnableClientScript="true">
                        </asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator runat="server" ID="revShippingEmailAddress" ControlToValidate="tbxShippingEmailAddress"
                            EnableClientScript="true" ErrorMessage="Incorrect Email Format" SetFocusOnError="true"
                            ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">
                        </asp:RegularExpressionValidator>
                        <br />
                        <label>
                            Address Line 1</label>
                        <asp:TextBox ID="tbxShippingAddressLine1" runat="server" CssClass="text" AutoPostBack="true"
                            OnTextChanged="tbxShippingAddressLine1_TextChanged"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvShippingAddressLine1" runat="server" ControlToValidate="tbxShippingAddressLine1"
                            ErrorMessage="* Required" Display="dynamic" SetFocusOnError="true" EnableClientScript="true">
                        </asp:RequiredFieldValidator>
                        <br />
                        <label>
                            Address Line 2</label>
                        <asp:TextBox ID="tbxShippingAddressLine2" runat="server" CssClass="text" AutoPostBack="true"
                            OnTextChanged="tbxShippingAddressLine2_TextChanged"></asp:TextBox>
                        <br />
                        <label>
                            City</label>
                        <asp:TextBox ID="tbxShippingCity" runat="server" CssClass="text"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvShippingCity" runat="server" ControlToValidate="tbxShippingCity"
                            ErrorMessage="* Required" Display="dynamic" SetFocusOnError="true" EnableClientScript="true">
                        </asp:RequiredFieldValidator>
                        <br />
                        <label>
                            State</label>
                        <ucc:StateDropDownList ID="uccShippingState" runat="server" UseFirstItem="true" CssClass="input1"
                            Style="width: 155px; background-color: rgb(255, 255, 160);" FirstItemText="None / Other"
                            FirstItemValue="NA">
                        </ucc:StateDropDownList>
                        <asp:RequiredFieldValidator ID="rfvShippingState" runat="server" ControlToValidate="uccShippingState"
                            ErrorMessage="* Required" Display="dynamic" SetFocusOnError="true" EnableClientScript="true">
                        </asp:RequiredFieldValidator>
                        <br />
                        <label>
                            Zip Code</label>
                        <asp:TextBox ID="tbxShippingZipCode" runat="server" CssClass="text" size="5" Style="width: 52px;"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvShippingZipCode" runat="server" ControlToValidate="tbxShippingZipCode"
                            ErrorMessage="* Required" Display="dynamic" SetFocusOnError="true" EnableClientScript="true">
                        </asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator runat="server" ID="revShippingZipCode" ControlToValidate="tbxShippingZipCode"
                            EnableClientScript="true" ErrorMessage="Incorrect Zip" SetFocusOnError="true"
                            ValidationExpression="^\d{5}$">
                        </asp:RegularExpressionValidator>
                        <br />
                        <label>
                            Country</label>
                        <ucc:CountryDropDownList ID="uccShippingCountry" CssClass="input1" runat="server"
                            Style="width: 155px; background-color: rgb(255, 255, 160);">
                        </ucc:CountryDropDownList>
                        <asp:RequiredFieldValidator ID="rfvShippingCountry" runat="server" ControlToValidate="uccShippingCountry"
                            ErrorMessage="* Required" Display="dynamic" SetFocusOnError="true" EnableClientScript="true">
                        </asp:RequiredFieldValidator>
                        <br />
                        <asp:CheckBox ID="cbxResidential" runat="server" Text="Is Residential Address" Checked="true" />
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="ddlShipp" EventName="SelectedIndexChanged" />
                    </Triggers>
                </asp:UpdatePanel>
            </fieldset>
            <asp:Panel runat="server" ID="pnlShoppingCart" Width="100%">
                <div class="shopping-cart-grid">
                    <asp:Repeater ID="rptShoppingCart" runat="server" OnItemDataBound="rptShoppingCart_ItemDataBound">
                        <HeaderTemplate>
                            <div class="grid-header clearfix">
                                <div class="item">
                                    Item
                                </div>
                                <div class="price">
                                    Price</div>
                                <div class="quantity">
                                    Quantity</div>
                                <div class="total" style="width: 20%!important;">
                                    Total</div>
                            </div>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:Panel runat="server" ID="pnlProduct">
                                <div class="grid-item clearfix">
                                    <div class="item">
                                        <div class="grid-product-image">
                                            <asp:Image runat="server" ID="imgItemImage" />
                                        </div>
                                        <asp:HyperLink runat="server" ID="hlkItem"></asp:HyperLink>
                                        <br />
                                        <asp:Label runat="server" ID="lblItemNumber"></asp:Label>
                                    </div>
                                    <div class="price">
                                        <asp:Label runat="server" ID="lblItemPrice" CssClass="price-text"></asp:Label>
                                    </div>
                                    <div class="quantity">
                                        <asp:Label runat="server" ID="lblQuantity" Width="32px"></asp:Label></div>
                                    <div class="total" style="width: 20%!important;">
                                        <asp:Label runat="server" ID="lblItemTotal"></asp:Label></div>
                                </div>
                            </asp:Panel>
                        </ItemTemplate>
                        <FooterTemplate>
                            <div class="grid-footer" style="width: 94%!important;">
                                <b>Subtotal:</b>
                                <asp:Label runat="server" ID="lblSubTotal" CssClass="grid-footer-total"></asp:Label>
                            </div>
                        </FooterTemplate>
                    </asp:Repeater>
                </div>
                <div class="grid-footer">
                </div>
            </asp:Panel>
            <div class="shopping-cart-grid">
                <asp:Repeater ID="rptShoppingCartForGift" runat="server" OnItemDataBound="rptShoppingCartForGift_ItemDataBound">
                    <HeaderTemplate>
                        <div class="grid-header clearfix">
                            <div class="item">
                                Gift Certificate
                            </div>
                            <div class="price">
                                Price</div>
                            <div class="quantity">
                                Quantity</div>
                            <div class="total" style="width: 20%!important;">
                                Total</div>
                        </div>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Panel runat="server" ID="pnlProduct">
                            <div class="grid-item clearfix">
                                <div class="item">
                                    <b>Name</b>
                                    <asp:Label ID="lblToName" runat="server" Text="Label"></asp:Label>
                                    <br />
                                    <b>Email</b>
                                    <asp:Label ID="lblToEmail" runat="server" Text="Label"></asp:Label>
                                </div>
                                <div class="price">
                                    <asp:Label runat="server" ID="lblItemPrice"></asp:Label>
                                </div>
                                <div class="quantity">
                                    <asp:Label runat="server" ID="lblQuantity" Width="32px"></asp:Label>
                                    <asp:Label ID="lblQuantityRequired" runat="server">&nbsp;</asp:Label>
                                </div>
                                <div class="total" style="width: 20%!important;">
                                    <asp:Label runat="server" ID="lblItemTotal"></asp:Label>
                                </div>
                            </div>
                        </asp:Panel>
                    </ItemTemplate>
                    <SeparatorTemplate>
                    </SeparatorTemplate>
                    <FooterTemplate>
                        <div class="grid-footer" style="width: 94%!important;">
                            <b>Subtotal: </b>
                            <asp:Label runat="server" ID="lblSubTotal" CssClass="grid-footer-total"></asp:Label>
                        </div>
                    </FooterTemplate>
                </asp:Repeater>
            </div>
            <div class="grid-footer">
            </div>
            <asp:Panel runat="server" ID="pnlEmptyCart" BackColor="#eeeeee" Width="100%">
                <%--  <b>Shopping Cart is Empty.</b>--%>
            </asp:Panel>
            <fieldset>
                <legend>Coupon</legend>
                <label>
                    Coupon Number
                </label>
                <asp:TextBox ID="tbxCouponNumber" runat="server" CssClass="text" Width="100px"></asp:TextBox>
                <asp:LinkButton ID="lnkbApply" runat="server" CausesValidation="false" Text="Apply"
                    OnClick="lnkbApply_Click" CssClass="button medium blue"></asp:LinkButton>
                <asp:LinkButton ID="lnkbCancel" runat="server" CausesValidation="false" Text="Cancel"
                   CssClass="button medium red" OnClick="lnkbCancel_Click"
                    Visible="false"></asp:LinkButton>
                <br />
                <asp:Label ID="lblCuponMessage" runat="server" Text=""></asp:Label>
            </fieldset>
            <asp:Panel ID="pnlShipping" runat="server">
                <fieldset>
                    <legend>Shipping Method </legend>
                    <label>
                        Shipping</label>
                    <ucc:UPSShippingMethodDropDownList ID="uccUPSShippingMethodDropDownList" runat="server"
                        OnSelectedIndexChanged="uccUPSShippingMethodDropDownList_SelectedIndexChanged"
                        AutoPostBack="true" Width="240px">
                    </ucc:UPSShippingMethodDropDownList>
                    <asp:UpdateProgress runat="server" ID="UpdateProgress1">
                        <ProgressTemplate>
                            <asp:Image runat="server" ID="imgUpdateProgress" ImageUrl="~/images/ajax-loader.gif">
                            </asp:Image>
                        </ProgressTemplate>
                    </asp:UpdateProgress>
                    <asp:RequiredFieldValidator ID="revUPSShippingMethodDropDownList" runat="server"
                        ControlToValidate="uccUPSShippingMethodDropDownList" ErrorMessage="* Required"
                        Display="static" SetFocusOnError="true" EnableClientScript="true" InitialValue="00">
                    </asp:RequiredFieldValidator>
                    <asp:UpdatePanel ID="uplUPSShippingMethodResponseMessage" runat="server">
                        <ContentTemplate>
                            <ucc:ResponseMessage ID="UPSShippingMethodResponseMessage" runat="server"></ucc:ResponseMessage>
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="uccUPSShippingMethodDropDownList" EventName="SelectedIndexChanged" />
                        </Triggers>
                    </asp:UpdatePanel>
                    <a href="<%= SiteGlobals.BaseUrl %>App_Style/images/UPS_map.jpg" class="fancybox"
                        style="text-decoration: none; color: #5AA0E0; font-weight: bold;">
                        <img src="~/App_Style/images/map.png" alt="UPS shipping map" runat="server" /></a>
                </fieldset>
            </asp:Panel>
            <fieldset>
                <legend>Detail</legend>
                <asp:Panel ID="pnlShiptext" runat="server">
                    <p>
                        Estimate Shipping &amp; Tax:(Shipping cost is calculated based on your shipping
                        state)
                    </p>
                </asp:Panel>
                <label>
                    Subtotal</label>
                <label style="font-weight: normal">
                    <asp:Label runat="server" ID="lblSubTotal2" CssClass="user">$0.00</asp:Label>
                </label>
                <br />
                <label>
                    Coupon Discount</label>
                <label style="font-weight: normal">
                    <asp:Label runat="server" ID="lblDiscount" CssClass="user">$0.00</asp:Label>
                </label>
                <br />
                <label>
                    Shipping &amp; Handling</label>
                <asp:UpdatePanel ID="uplShippingCost" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <label style="font-weight: normal">
                            <asp:Label ID="lblShippingHandling" CssClass="user" runat="server">$0.00</asp:Label>
                        </label>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="uccUPSShippingMethodDropDownList" EventName="SelectedIndexChanged" />
                    </Triggers>
                </asp:UpdatePanel>
                <br />
                <label>
                    Tax</label>
                <asp:UpdatePanel ID="uplTax" runat="server">
                    <ContentTemplate>
                        <label style="font-weight: normal">
                            <asp:Label runat="server" ID="lblTax" CssClass="user">$0.00</asp:Label>
                        </label>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="uccBillingState" EventName="SelectedIndexChanged" />
                         <asp:AsyncPostBackTrigger ControlID="tbxBillingCity" EventName="TextChanged" />
                    </Triggers>
                </asp:UpdatePanel>
                <br />
                <label>
                    Total</label>
                <asp:UpdatePanel ID="uplTotal" runat="server">
                    <ContentTemplate>
                        <label style="font-weight: normal">
                            <asp:Label ID="lblTotal" runat="server" CssClass="user">$0.00</asp:Label>
                        </label>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="uccUPSShippingMethodDropDownList" EventName="SelectedIndexChanged" />
                        <asp:AsyncPostBackTrigger ControlID="uccBillingState" EventName="SelectedIndexChanged" />
                    </Triggers>
                </asp:UpdatePanel>
            </fieldset>
            <fieldset>
                <legend>Payment Information </legend>
                <label>
                    Payment Method
                </label>
                <asp:DropDownList ID="DropDownListPaymentType" runat="server" Width="225px" AutoPostBack="true"
                    OnSelectedIndexChanged="DropDownListPaymentType_SelectedIndexChanged">
                    <asp:ListItem Text="Credit Card" Value="2"></asp:ListItem>
                 <%--   <asp:ListItem Text="Gift Certificate" Value="1"></asp:ListItem>
                    <asp:ListItem Text="GiftCertificate and Credit Card" Value="3"></asp:ListItem>--%>
                </asp:DropDownList>
            </fieldset>
            <fieldset>
                <asp:UpdatePanel runat="server" ID="upnlPaymentInfo" ChildrenAsTriggers="false" UpdateMode="Conditional">
                    <ContentTemplate>
                        <asp:Panel runat="server" ID="pnlGiftCertificateEntry" Visible="false">
                            <fieldset>
                                <legend>Gift Certificate Detail</legend>
                                <label>
                                    Code
                                </label>
                                <asp:TextBox runat="server" ID="TextBoxGiftCertificateCode" CssClass="textbox" Width="143px"> 
                                </asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvGiftCertCode" runat="server" ControlToValidate="TextBoxGiftCertificateCode"
                                    ErrorMessage="* Required" Display="dynamic" SetFocusOnError="true" EnableClientScript="true"></asp:RequiredFieldValidator>
                            </fieldset>
                        </asp:Panel>
                        <asp:Panel runat="server" ID="pnlCreditCardEntry">
                            <fieldset>
                                <legend>Card Detail</legend>
                                <label>
                                    Card Type
                                </label>
                                <%--<asp:DropDownList ID="ddLCardType" runat="server" Width="150px">
                                    <asp:ListItem Text="Select One" Value="NA"></asp:ListItem>
                                    <asp:ListItem Text="American Express" Value="American Express"></asp:ListItem>
                                    <asp:ListItem Text="Discover" Value="Discover"></asp:ListItem>
                                    <asp:ListItem Text="MasterCard" Value="MasterCard"></asp:ListItem>
                                    <asp:ListItem Text="Visa" Value="Visa"></asp:ListItem>
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="ddLCardType"
                                    ErrorMessage="* Required" Display="dynamic" SetFocusOnError="true" EnableClientScript="true"
                                    InitialValue="NA">
                                </asp:RequiredFieldValidator>--%>
                                <div id="cardType">
                                    <img id="visa" src="<%= SiteGlobals.BaseUrl %>App_Style/images/visa.png" style="height: 34px;" /><img id="master"
                                        src="<%= SiteGlobals.BaseUrl %>App_Style/images/master.png" style="height: 32px;" /><img id="discover" src="<%= SiteGlobals.BaseUrl %>App_Style/images/discover.png"
                                            style="height: 32px;" /><img id="express" src="<%= SiteGlobals.BaseUrl %>App_Style/images/american_express.png"
                                                style="height: 34px;" />
                                </div>
                                <br />
                                <label>
                                    Card Number
                                </label>
                                <asp:TextBox ID="tbxCardNumber" runat="server" CssClass="text" Width="143px" onKeyUp="javascript:CreditCard(this.value)"
                                    onchange="InvalidCard(this.value)" MaxLength="19"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="tbxCardNumber"
                                    ErrorMessage="* Required" Display="dynamic" SetFocusOnError="true" EnableClientScript="true">
                                </asp:RequiredFieldValidator>
                                <br />
                                Please enter your credit card's 3<br />
                                or 4 digit security code <a target="_blank" href="<%= AutoGear.BLL.CustomSiteMap.CCCode %>">
                                    What's this?</a>&nbsp;&nbsp;
                                <asp:TextBox ID="tbxSecurityCode" runat="server" CssClass="text" MaxLength="4" Width="52px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="tbxSecurityCode"
                                    ErrorMessage="* Required" Display="dynamic" SetFocusOnError="true" EnableClientScript="true">
                                </asp:RequiredFieldValidator>
                                <br />
                                <label>
                                    Expiration Date
                                </label>
                                <asp:DropDownList ID="ddlMonth" runat="server" CssClass="textb">
                                    <asp:ListItem Text="Month" Value="NA"></asp:ListItem>
                                    <asp:ListItem Text="January" Value="1"></asp:ListItem>
                                    <asp:ListItem Text="February" Value="2"></asp:ListItem>
                                    <asp:ListItem Text="March" Value="3"></asp:ListItem>
                                    <asp:ListItem Text="April" Value="4"></asp:ListItem>
                                    <asp:ListItem Text="May" Value="5"></asp:ListItem>
                                    <asp:ListItem Text="June" Value="6"></asp:ListItem>
                                    <asp:ListItem Text="July" Value="7"></asp:ListItem>
                                    <asp:ListItem Text="August" Value="8"></asp:ListItem>
                                    <asp:ListItem Text="September" Value="9"></asp:ListItem>
                                    <asp:ListItem Text="October" Value="10"></asp:ListItem>
                                    <asp:ListItem Text="November" Value="11"></asp:ListItem>
                                    <asp:ListItem Text="December" Value="12"></asp:ListItem>
                                </asp:DropDownList>
                                <asp:DropDownList ID="ddlYear" runat="server">
                                    <asp:ListItem Text="Year" Value="NA"></asp:ListItem>
                                    <asp:ListItem Text="2009" Value="2009"></asp:ListItem>
                                    <asp:ListItem Text="2010" Value="2010"></asp:ListItem>
                                    <asp:ListItem Text="2011" Value="2011"></asp:ListItem>
                                    <asp:ListItem Text="2012" Value="2012"></asp:ListItem>
                                    <asp:ListItem Text="2013" Value="2013"></asp:ListItem>
                                    <asp:ListItem Text="2014" Value="2014"></asp:ListItem>
                                    <asp:ListItem Text="2015" Value="2015"></asp:ListItem>
                                    <asp:ListItem Text="2016" Value="2016"></asp:ListItem>
                                    <asp:ListItem Text="2017" Value="2017"></asp:ListItem>
                                    <asp:ListItem Text="2018" Value="2018"></asp:ListItem>
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="ddlMonth"
                                    ErrorMessage="* Month Required" Display="dynamic" SetFocusOnError="true" EnableClientScript="true"
                                    InitialValue="NA">
                                </asp:RequiredFieldValidator>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="ddlYear"
                                    ErrorMessage="* Year Required" Display="dynamic" SetFocusOnError="true" EnableClientScript="true"
                                    InitialValue="NA">
                                </asp:RequiredFieldValidator>
                            </fieldset>
                        </asp:Panel>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="DropDownListPaymentType" />
                    </Triggers>
                </asp:UpdatePanel>
            </fieldset>
        </asp:Panel>
        <fieldset>
            <legend>Message/Comments</legend>
            <label>
                Comments OR Special Instructions
            </label>
            <asp:TextBox ID="tbxComment" runat="server" CssClass="text" TextMode="MultiLine"
                Style="height: 130px!important; width: 330px!important"></asp:TextBox>
            <br />
            <label>
                Gift Message</label>
            <asp:TextBox ID="tbxGiftMessage" runat="server" CssClass="text" TextMode="MultiLine"
                Style="height: 130px!important; width: 330px!important"></asp:TextBox>
            <%--<br />
            <label>
                Office Use Only</label>
            <asp:TextBox ID="tbxOfficeUseOnly" runat="server" CssClass="text" TextMode="MultiLine"
                Style="height: 130px!important; width: 330px!important"></asp:TextBox>--%>
        </fieldset>
        <br />
     <%--   <div style=" visibility:hidden;">
        HttpPost Request:
        <br />
        <asp:TextBox ID="txtWebRequests" runat="server" TextMode="MultiLine" 
                    Width="715px"></asp:TextBox>
                     <br />
        HttpPost Response:
        <br />
         <asp:TextBox ID="txtWebResponse" runat="server" TextMode="MultiLine" 
                    Width="715px"></asp:TextBox>
   </div>--%>
        <div class="btn-place-holder">
             <%--<asp:Button runat="server" ID="btnLoadPostData" Text="Load Post Data" CssClass="button gray"
                OnClick="btnLoadPostData_Click" />--%>
            <asp:Button runat="server" ID="imbPlaceOrderOnline" Text="Place Order Online" CssClass="button gray"
                OnClick="PlaceOrderOnline_Click" />
        </div>
    </div>
</asp:Content>
